<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生列表</title>
    <!-- 引入 LayUI CSS -->
    <link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.6.8/css/layui.css" media="all">
    <link href="/css/student/list.css" rel="stylesheet">
</head>
<body>
<!--1-->
<!--<table class="layui-table" lay-even>-->
<!--    <tr>-->
<!--        <th>学号</th>-->
<!--        <th>姓名</th>-->
<!--        <th>登录时间</th>-->
<!--    </tr>-->
<!--    <tr th:each="student : ${students}">-->
<!--        <td th:text="${student.id}"></td>-->
<!--        <td th:text="${student.name}"></td>-->
<!--        <td th:text="${student.logintime}"></td>-->

<!--    </tr>-->
<!--</table>-->

<!--2-->


<div class="container">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <h1 style="text-align: center">学生信息管理</h1>
        </div>
    </div>
    <!--  搜索框  -->
    <input type="text" id="nameInput" placeholder="请输入学生姓名" class="layui-input"
           style="width: 200px; display: inline-block;">
    <!--  搜索按钮  -->
    <button class="layui-btn" id="searchStudentBtn" onclick="findStudentByName();return false;">
        <i class="layui-icon layui-icon-search"></i>
    </button>
    <!--  新增按钮  -->
    <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-anim" id="addStudentBtn"
            onclick="showStudentDlg();return false;" style="height: 40px;">
        <i class="layui-icon layui-icon-addition"></i>
    </button>
    <div class="layui-row">
        <div class="layui-col-xs12">
            <table class="layui-table" lay-even>
                <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="studentTb">
                </tbody>
            </table>
        </div>
    </div>
</div>

<!--<div class="container">
    <div class="layui-col-xs12">
        <h1 style="text-align: center">学生信息管理</h1>
    </div>
    <div class="layui-col-xs12 toolbar">
        <button type="button" class="layui-btn layui-btn-normal layui-btn-radius"
                onclick="showStudentDlg();return false;">
            <i class="layui-icon layui-icon-add-circle-fine"></i>
        </button>
    </div>
    <div class="layui-col-xs12">
        <table class="layui-table" lay-even>
            <thead>
            <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
            </tr>
            </thead>
            <tbody id="studentTb">
            &lt;!&ndash;使用ajax来动态获取数据&ndash;&gt;
            </tbody>
        </table>
    </div>
</div>-->

<!--表单-->
<form class="layui-form dlgcontainer" id="studForm" style="display: none;">
    <div class="demo-reg-container">
        <div class="layui-form-item" id="formId">
            <div class="layui-row">
                <div class="layui-col-xs12">
                    <div class="layui-input-wrap">
                        <div class="layui-input-prefix">
                            <i class="layui-icon layui-icon-cellphone"></i>
                        </div>
                        <input type="text" name="studentId" value="" placeholder="学号" lay-reqtext="请填写学号"
                               autocomplete="off" class="layui-input" id="studentId">
                    </div>
                </div>

            </div>
        </div>
        <!--            <div class="layui-form-item">
                        <div class="layui-input-wrap">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-vercode"></i>
                            </div>
                            <input type="text" name="sno" value="" lay-verify="required" placeholder="学号" lay-reqtext="请填学号"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>-->
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <div class="layui-input-prefix">

                    <i class="layui-icon layui-icon-username"></i>

                </div>
                <input type="text" name="name" value="" lay-verify="required" placeholder="姓名" autocomplete="off"
                       class="layui-input" id="name">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <label class="layui-form-label">性别</label>

                <div class="layui-input-block">
                    <input type="radio" name="sex" value="1" title="男" checked>
                    <input type="radio" name="sex" value="0" title="女">

                </div>

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <div class="layui-input-prefix">
                    <i class="layui-icon layui-icon-light"></i>
                </div>
                <input type="text" name="age" value="" placeholder="年龄" autocomplete="off" class="layui-input"
                       lay-affix="clear">
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="stud-dlg" id="btnOK">确定</button>
        </div>

    </div>
</form>

<!-- 引入 jQuery 和 LayUI JS -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://www.layuicdn.com/layui-v2.6.8/layui.js"></script>
<script src="/js/student/list.js"></script>
</body>
</html>